#!/bin/sh
#
# Refresh the random db and rsa data of the central server of the moros project
#
certtool --generate-dh-params --bits 1024 --outfile /var/lib/moros/dhfile
certtool --generate-privkey --bits 512 --outfile /var/lib/moros/rsafile
if [ -e /var/run/moros_central.pid ]; then
    kill -s HUP `cat /var/run/moros_central.pid` || echo "moros-central not running"
fi
